package y24.m2;

import java.util.ArrayList;
import java.util.List;

public class Test1 {
    public static void main(String[] args) {
        List<Integer> list = new ArrayList<>();
        int num = 2;
        while (list.size() <= 2019){
            if (zhishu(num , list)){
                list.add(num);
            }
            num++;
        }
    }
    public static boolean zhishu(int num , List<Integer> list){
        if (num <= 1) {
            return false;
        }
        for (int i = 2; i < num; i++) {
            if (num % i == 0) {
                return false;
            }
        }
        System.out.println(list.size() + ":" + num);
        return true;
    }
}
